//获取cookie
export function getCookie(key) {
	var arr = document.cookie.split("; ");
    for(var i=0; i<arr.length;i++){
        var arr2 = arr[i].split("=");
        if(arr2[0]==key){
            return arr2[1];
        }
    }
}
//设置cookie
export function setCookie(key,value) {
	var oDate = new Date();
	var expiresHours=9;
	oDate.setTime(oDate.getTime()+expiresHours*3600);
	document.cookie = key + '='+value+';expries ='+oDate.toGMTString();
}
//删除cookie
export function removeCookie(key) {
	setCookie(key,-1)
}

export default{
	getCookie,
	setCookie,
	removeCookie
}